/**
 * Project Reactor
 */


#ifndef _INETADDRESS_H
#define _INETADDRESS_H
#include <string>
#include <arpa/inet.h>
using std::string;


class InetAddress {
public: 
    
/**
 * @param port
 * @param ip
 */
InetAddress(unsigned short port, string & ip);

InetAddress(unsigned short port);
    
/**
 * @param addr
 */
InetAddress(const struct sockaddr_in & addr);
    
string getip()const;
    
unsigned short getport()const;
    
struct sockaddr_in * getInetAddressPtr();
private: 
    struct sockaddr_in _addr;
};

#endif //_INETADDRESS_H
